home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 12496 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  971 b 

  1. Path: www.cybercity.dk!usenet
  2. From: monsted@cybercity.dk (Monsted)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Looking to get out of a loop
  5. Date: Sun, 17 Mar 1996 13:05:23 GMT
  6. Organization: Monsted Chartering A/S
  7. Message-ID: <4ih1at$7q5@vip.cybercity.dk>
  8. References: <4i9rnh$bbg@gateway.i2020.net>
  9. NNTP-Posting-Host: 194.16.56.150
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. milton@i2020.net wrote:
  13.  
  14. >I am new to this. Can anyone give me some pointers on how to get out of 
  15. >this loop. I am prompting the user for input until the Enter key is 
  16. >pressed. What test to perform on the input variable for the enter key? 
  17.  
  18. >I defined "char ch" as the input variable using "cin" to receive input.
  19.  
  20. repeat (ch != "\n")
  21.   {
  22.   cin(ch);      ???
  23.   }
  24.  
  25. i think...
  26.  
  27. Jesper
  28. +----------------+-----------------------------------+
  29. | Jesper Monsted | monsted@cybercity.dk              |
  30. | Denmark        |                                   |
  31. +----------------+-----------------------------------+
  32.  
  33.